package chatGUI;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * @author Michael & Pierre
 */
/**
 * Action Listener to be called when the user clicks on the Send File button (on connected window only)
 */
public class SendFileButtonListener implements ActionListener{
	
	/**
	 * To keep track of the calling platform-specific GUI
	 */
	private JavaGUI gui;
	
	/**
	 * Constructor to memorize the calling platform-specific GUI's address
	 * @param ihm
	 */
	public SendFileButtonListener(JavaGUI ihm) {
		this.gui = ihm;
	}
	
	/**
	 * Demands to the calling platform-specific GUI to send a file
	 * @param arg0
	 */
	@Override
	public void actionPerformed(ActionEvent arg0) {
		gui.sendFile();
	}
}

